import pandas as pd
from sklearn.model_selection import train_test_split


def read_data():
    file = './data/model_sample.csv'
    return pd.read_csv(file)


def get_train_test_data(df, train_size=0.7):
    x = df.ix[:, 1:]
    y = df.ix[:, 0]

    x_train, x_test, y_train, y_test = train_test_split(x, y, test_size=1 - train_size, random_state=0)
    return x_train, x_test, y_train, y_test
